package com.example.controller.sys;

import com.example.service.ICompanyService;
import com.example.vo.ResultVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.CrossOrigin;
/**
 * <p>
 * 公司表 前端控制器
 * </p>
 * @author wsl
 * @since 2022-04-12
 */
@RestController
@RequestMapping("/sys/company")
@Api(tags = "公司管理",value = "")
public class CompanyController {

    @Autowired
    private ICompanyService companyService;

    @ApiOperation(value = "获取所有公司的部门信息")
    @GetMapping("/dept-list")
    public ResultVo getCompanyWithDeptList(){
        return companyService.getCompanyWithDeptList();
    }

    @ApiOperation(value = "查询所有的公司选项")
    @GetMapping("/options")
    public ResultVo getCompanyOptions(){
        return companyService.getCompanyOptions();
    }
}
